<?php

/**
 * 个人中心
 * Class Controller_Wwwmall2_User
 */
class Controller_Wwwmall3_User extends Controller_Wwwmall2_Abstract
{
    public function indexAction(){
        global $_F;
        $this->assign('order_num',Service_Order::getOrderNum($_F['uid']));
        $this->assign('title','个人中心');
        $goodsList = Service_Goods::getRecommendGoodsList(2);
        $this->assign('goodsList',$goodsList);
        $this->display('user/index');
    }

    /**
     * 订单数量
     * @return bool
     */
    public function orderNumAction(){
        global $_F;
        $data['nopay_order_num'] = Service_Order::getOrderNum($_F['uid'],1);
        $data['nojd_order_num'] = Service_Order::getOrderNum($_F['uid'],2);
        $data['jd_order_num'] = Service_Order::getOrderNum($_F['uid'],3);
        $data['ps_order_num'] = Service_Order::getOrderNum($_F['uid'],4);
        return FResponse::output($data);
    }
}